﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualStudio.Modeling.Validation;
using Microsoft.VisualStudio.Modeling;
using Microsoft.VisualStudio.Modeling.Diagrams;
using EnvDTE;
using System.Windows.Forms;
using System.Drawing;

namespace UofCASE.AgileProductLinerDSL {
    /// <summary>
    /// Implements the FeatureShape geometry shape
    /// </summary>
    public partial class FeatureShape {

        public void GrayOut() {
            BrushSettings backgroundBrush = new BrushSettings();
            backgroundBrush.Color = global::System.Drawing.Color.Gainsboro;
            this.StyleSet.OverrideBrush(DiagramBrushes.ShapeBackground, backgroundBrush);
            BrushSettings forgroundBrush = new BrushSettings();
            forgroundBrush.ForeColor = global::System.Drawing.Color.LightGray;
            this.StyleSet.OverrideBrush(DiagramBrushes.ShapeText, forgroundBrush);
            PenSettings penSettings = new PenSettings();
            penSettings.Color = global::System.Drawing.Color.LightGray;
            this.StyleSet.OverridePen(DiagramPens.ShapeOutline, penSettings);
            this.Invalidate(true);
        }

        public void ResetColor() {
            this.StyleSet.ClearBrushOverride(DiagramBrushes.ShapeBackground);
            this.StyleSet.ClearBrushOverride(DiagramBrushes.ShapeText);
            this.StyleSet.ClearPenOverride(DiagramPens.ShapeOutline);
            this.Invalidate(true);
        }
    }
}
